package com.canbot.u05.activity;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.widget.ImageButton;

import com.canbot.u05.R;
import com.canbot.u05.receivers.IntentKey;
import com.canbot.u05.view.ImageTextButton;

public class SensorVoiceActivity extends BaseActivityNoTitle {

        private ImageTextButton vc_peoplesensorvoice, vc_touchsensorvoice;

        private ImageButton vc_close;

        private Context mContext;
        @Override
        protected void onCreate(Bundle savedInstanceState) {
                super.onCreate(savedInstanceState);
                setContentView(R.layout.activity_sensor_voice);
                mContext = this;
                initView();
        }

        private void initView() {


                vc_peoplesensorvoice = (ImageTextButton) findViewById(
                        R.id.vc_peoplesensorvoice);
                vc_peoplesensorvoice.setImageResource(R.drawable.peoplesensorvoice);
                vc_peoplesensorvoice.setText("人体感应器");
                vc_peoplesensorvoice.setOnClickListener(new View.OnClickListener() {

                        @Override
                        public void onClick(View v) {
                                Intent intent = new Intent(mContext, StarttheVoiceActivity.class);
                                intent.putExtra("SensorBackActivity", IntentKey.SENSOR_PEOPLE);
                                startActivity(intent);
                        }
                });

                vc_touchsensorvoice = (ImageTextButton) findViewById(
                        R.id.vc_touchsensorvoice);
                vc_touchsensorvoice.setImageResource(R.drawable.touchsensorvoice);
                vc_touchsensorvoice.setText("触摸感应器");
                vc_touchsensorvoice.setOnClickListener(new View.OnClickListener() {

                        @Override
                        public void onClick(View v) {
                                startActivity(new Intent(mContext, TouchSensorVoiceActivity.class));
                        }
                });

                vc_close = (ImageButton) findViewById(R.id.vc_close);
                vc_close.setOnClickListener(new View.OnClickListener() {

                        @Override
                        public void onClick(View v) {
                                finish();
                        }
                });
        }
}
